how to create a vector class in java